package com.jsb.laundry.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * 订单退款
 * @TableName jsb_orders_refund
 */
@TableName(value ="jsb_orders_refund")
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "JsbOrdersRefund对象",description = "订单退款记录")
public class JsbOrdersRefund implements Serializable {
    @ApiModelProperty(value = "自增id", dataType = "int")
    @TableId(type = IdType.AUTO)
    private int id;

    @ApiModelProperty(value = "退款编号", dataType = "string")
    private String refundNo;

    @ApiModelProperty(value = "订单id", dataType = "string")
    private String orderId;

    @ApiModelProperty(value = "商品id", dataType = "string")
    private String productId;

    @ApiModelProperty(value = "商品单价", dataType = "int")
    private int price;

    @ApiModelProperty(value = "申请退款的用户id", dataType = "string")
    private String userId;

    @ApiModelProperty(value = "订单总价", dataType = "int")
    private int totalPrice;

    @ApiModelProperty(value = "订单实际支付金额", dataType = "int")
    private int paidPrice;

    @ApiModelProperty(value = "订单支付成功时间", dataType = "date")
    private Date orderPaidAt;

    @ApiModelProperty(value = "退款金额", dataType = "int")
    private int refundPrice;

    @ApiModelProperty(value = "退款件数", dataType = "int")
    private int refundNum;

    @ApiModelProperty(value = "退款类型：1仅退款；2退货退款", dataType = "int")
    private int refundType;

    @ApiModelProperty(value = "退款原因：1:我不想买了 2:信息填写错误，重新拍 3:其它原因", dataType = "int")
    private int refundReason;

    @ApiModelProperty(value = "退款说明", dataType = "string")
    private String refundNote;

    @ApiModelProperty(value = "退款申请(apply) 已退款(refunded) 平台拒绝退款(refused) 用户关闭退款(closed) 退款中(refunding)", dataType = "string")
    private String refundStatus;

    @ApiModelProperty(value = "拒绝退款原因", dataType = "string")
    private String refusedNote;

    @ApiModelProperty(value = "退款凭证", dataType = "string")
    private String refundImgs;

    @ApiModelProperty(value = "是否是最后一笔退款 0不是 1是", dataType = "int")
    private int isLast;

    @ApiModelProperty(value = "申请时间", dataType = "date")
    private Date applyAt;

    @ApiModelProperty(value = "拒绝时间", dataType = "date")
    private Date refusedAt;

    @ApiModelProperty(value = "同意时间", dataType = "date")
    private Date agreedAt;

    @ApiModelProperty(value = "退款完成时间", dataType = "date")
    private Date successAt;

    @ApiModelProperty(value = "创建时间", dataType = "date")
    private Date createdAt;

    @ApiModelProperty(value = "更新时间", dataType = "date")
    private Date updatedAt;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}